package com.swanclouds.redfish.common.redfish;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 李文强
 * description
 */
@SuppressWarnings("all")
public class Addresses {

    /**
     * 指定BMC网口的IPv4地址（仅在配置静态地址时使用该字段）
     */
    @JsonProperty("Address")
    private String address;

    //指定BMC网口的IPv4地址对应的子网掩码（仅在配置静态地址时使用该字段）
    @JsonProperty("SubnetMask")
    private String subnetMask;

    //指定BMC网口的IPv4网关地址（仅在配置静态地址时使用该字段）
    @JsonProperty("Gateway")
    private String gateway;

    //指定BMC网口的IPv4地址模式，包括：Static 配置为静态地址 DHCP 配置为动态获取
    //指定BMC网口的IPv6地址模式，包括：Static DHCPv6  LinkLocal SLAAC
    @JsonProperty("AddressOrigin")
    private String addressOrigin;

    //指定BMC网口的IPv6地址对应的前缀长度（仅在AddressOrigin为Static时有该字段）
    @JsonProperty("PrefixLength")
    private Integer prefixLength;


    public Addresses address(String address) {
        this.address = address;
        return this;
    }

    public Addresses subnetMask(String subnetMask) {
        this.subnetMask = subnetMask;
        return this;
    }

    public Addresses gateway(String gateway) {
        this.gateway = gateway;
        return this;
    }

    public Addresses addressOrigin(String addressOrigin) {
        this.addressOrigin = addressOrigin;
        return this;
    }

    public Addresses prefixLength(Integer prefixLength) {
        this.prefixLength = prefixLength;
        return this;
    }
    public static Addresses update() {
        return new Addresses();
    }

    public static List<Addresses> addressesList(Addresses addresses){

        List<Addresses>  address = new ArrayList<>();

        address.add(addresses);

        return address;
    }
}
